<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>메인하면</title>
</head>
<script> 

function join() { 
	location.href="./join.jsp";
} 

function login() {
	location.href="./login.jsp";
}

</script> 


<body  topmargin="30" marginwidth="20" >

<table align="left" width="100%" height="100%" >




<form name="loginform" method="post" action="manager" onsubmit="return check()">

<table  border="1" cellpadding="0" cellspacing="5" bgcolor="#FFFFCC" width="650" height="150" background="images/a.jpg">
<tr  >
<td colspan="3" ><td  align="center"><font color="#5AD18F"><h1></h1></font></td> </td>
</tr>
</table>


<table border="1" cellpadding="0" cellspacing="5" bgcolor="#FFFFF"  >
<tr  align="left"><!--
Integer sessionManager = (Integer)session.getAttribute("manager");


-->

<!--관리자 페이지로 로그인 할경우 if 문을 이용한 권한 부여 함  시작-->

<%
String sessionId = (String)session.getAttribute("id"); 
String managerId = (String)session.getAttribute("manager");
	
out.println("회원권한:" + managerId);

if(managerId.equals("1"))// 이거 매니저 권한대로 보여준거에요
{
%>
<td><a href="./manager.lg">회원목록</a></td>
<td><a href="board/list.do">자유 게시판</a></td>
<td><a href="item/list.do">이미지 게시판</a></td>
<td><a href="request/list.do">질문 게시판</a></td>
<%
}
else
{
%>
<td><a href="board/list.do">자유 게시판</a></td>
<td><a href="item/list.do">이미지 게시판</a></td>
<td><a href="request/list.do">질문 게시판</a></td>
<%
}
%>

  <!-- 권한부여 끝부분 -->


<td><a href="#"><%=sessionId%>님<!-- 
		<%
		if(sessionId.equals("")){
		%><a href="./manager/manager_my.jsp">관리자</a><%
		}%> -->
	</a>
</td>
<td>
<a href="#"><input type="button" value="log out" onClick="location.href='logout.jsp'"/></a>
</td>

</tr>


</table>

<table  width="650" border="1" align="left" cellpadding="1" cellspacing="1" height="500" background="images/img.JPG">
<!-- 로그인 후 화면 사라지 -->
<tr>
<td><td valign=top >


</table>


<!-- 로그인 화면 끝 부분 -->

</table>



</body>
</html>